<!-- 注册用户页面.-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
    <HEAD>
        <TITLE>注册</TITLE>
        <META http-equiv=Content-Type content="text/html; charset=utf-8">
        <Link rel="stylesheet" type="text/css" href="css/reg2.css"/>
        <!-- 引入lyaui.css框架 -->
	    <link rel="stylesheet" type="text/css" href="layui/css/layui.css"/>
        <!-- 引入login.css-->
	    <link rel="stylesheet" type="text/css" href="css/login.css"/>
            <style type="text/css">
        body {
            background: url(images/3.png) no-repeat;	
        }
    </style>
         <?php
        require_once './comm/comm.php';
        ?>
        <script language="javascript">

            function init(){
                document.regForm.head[0].checked=true; //初始化头像选择
            }
        
            function check() {
                if(document.regForm.user.value==""){
                    alert("用户名不能为空");
                    return false;
                }
                if(document.regForm.password.value==""){
                    alert("密码不能为空");
                    return false;
                }
                if(document.regForm.password.value != document.regForm.password2.value){
                    alert("2次密码不一样");
                    return false;
                }
            }
        </script>

    </HEAD>
    <BODY onLoad="init()">
     <div class="login layui-anim layui-anim-up">
        <div class="message">注册</div>
        <div id="darkbannerwrap"></div>
        <!--      用户注册表单        -->
        <DIV  class="t" style="MARGIN-TOP: 15px" align="center">
            <FORM name="regForm" onSubmit="return check()" action="./manage/doReg.php" method="post">
                <p>      
                <INPUT class="input" tabIndex="1" type="text" maxLength="20" size="35" name="user" placeholder="请输入用户名"/></p>
                <hr class="hr15">
                <p>
                <INPUT class="input" tabIndex="2" type="password" maxLength="20" size="36" name="password" placeholder="请输入密码"/></p>
                <hr class="hr15">
                <p>
                <INPUT class="input" tabIndex="3" type="password" maxLength="20" size="36" name="password2" placeholder="确认密码"/></p>
                <hr class="hr15">  


				<p>请选择头像 </p>

<?php
        for ($i = 1; $i <= 8; $i++) {//循环输出系统头像
            echo "<img src='images/head/$i.jpg'/><input type='radio' name='head' value='$i.jpg'/>";
            if ($i % 4 == 0) //每4个换一行
                echo"</br>";
        }
?>				
                <br/>
                <INPUT class="btn" tabIndex="4" type="submit" value="注册" style="width:45%;" >
                <a href="index.php"><input type="button" id="login_submit" value="返回" style="width:45%;"></input></a>
                
            </FORM>
        </DIV>
        </div>
        <BR> <!-- 引入layui.js框架 -->
	<script src="layui/layui.js"></script>
    <!-- 引入login.js -->
    <script src="js/login.js"></script>
    </BODY>
</HTML>
